﻿@model dynamic
@section header{
    <title>达达充值-配送管理</title>
    <link type="text/css" rel="stylesheet" href="/admin_store/css/site.css" />
    <script type="text/javascript" src="/admin_store/scripts/jquery.js"></script>
    <script type="text/javascript" src="/admin_store/scripts/showlist.js"></script>
    <link rel="stylesheet" type="text/css" href="/components/jbox/Skins/Default/jbox.css" />
    <script type="text/javascript" src="/components/jbox/jquery.jBox-2.3.min.js"></script>
    <script type="text/javascript" src="/admin_store/scripts/selectlist.js"></script>
    <style>
    .container {margin: 20px;margin-top: 30px;}
    .top_title { background-color: #F5F5F5;}
    .title {padding: 20px 0 20px 20px;}
    .cash {color: #FE2233;font-size: 16px;}
    
    .order_no { padding-left: 200px;}
    .type_choose { margin: 20px auto 20px auto;font-size: 14px;font-weight: bold;}
    .choosen_box {height:70px;border: 1px solid #efe7e7;}
    .choosen_pay{height: 50px;margin:15px 0 0 40px;}
    .choosen_pay ul {list-style: none;}
    .choosen_item {width: 162px; float: left;border:1px solid #efe7e7;margin-right: 50px;height: 40px;cursor: pointer;}
    .active {border:1px solid #FF2638;}
    .submint { width: 80px;height: 30px;background-color: #FF2638;color: #fff;font-size: 14px;line-height: 30px;text-align: center; border-radius: 3px;margin-left: 40px;margin-top: 15px;cursor: pointer;}
    #layer1{background-color:#696565; left:0; opacity:0.3; position:fixed; top:0; z-index:999; filter:alpha(opacity=50); -moz-opacity:0.7; -khtml-opacity:0.5;cursor: pointer; }  
    .con-right{width: 560px;height: 380px;background-color: #fff;position:fixed;display: none;z-index:1000;margin-top: -113.5px;top: 30%;left: 50%;margin-left: -280px;border: 1px solid #FF2638;}
    .code_title{height:35px;background-color:#ff8427;color:#fff;line-height:35px;font-size:14px}
    .code_title span{padding-left:10px}
    .code_title img{float:right;padding-right:10px;width:25px;height:25px;cursor:pointer;padding-top:5px}
    .pay_code{width: 200px;height: 200px;margin-left: auto;margin-right: auto;margin-top: 10px;border: 1px solid #D5D5D5;position: relative;}
    .pay_code img{width: 150px;height: 150px;top: 50%;left: 50%;margin-left: -75px; margin-top: -75px;position: absolute;}
    .pay_cash{color:#FF2638;text-align: center;margin-top: 20px;}
    .pay_btn{width: 200px;height: 30px;background-color:#FCFFFF;border: 1px solid #D5D5D5;border-radius: 30px;  margin-left: auto;margin-right: auto;font-size: 12px;text-align: center;line-height: 30px;margin-top: 30px;cursor: pointer;}
    .choose_zfb{display:none;}
    .choose_wx{display:none;}
    </style>
}

@section body{
    <h1 class="rightH1">
        微信小程序 &gt; 餐饮外卖 &gt; <span class="rightH1-cur">充值确认</span>
        <div class="right">
            <div class="clear"></div>
        </div>
        <div class="clear"></div>
    </h1>

 <form action="@Url.Action("submitorder")" target="_blank">
	<div class="addTable">

            <div class="container">
                <div class="top_title">
                    <div class="title">
                        <span>支付金额：</span><span class="cash ordermoney">@Request["ordermoney"]</span>
                        <span class="order_no">充值商户：</span><span class="order">@WorkContext.StoreName</span>
                    </div>
                </div>
                <div class="type_choose">
                    常用支付方式
                </div>
                <div class="choosen_box">
                    <div class="choosen_pay">
                        <ul>
                            <!--
                            <li class="choosen_item" data-id="1">
                                <img src="images/weixin.gif">
                                <img class="choose_wx_1" src="images/choosen.png">
                            </li>
                        -->
                            <li class="choosen_item active" data-id="2">
                                <img src="/admin_store/images/pay/zhifubao.gif">
                                <img class="choose_zfb_2" src="/admin_store/images/pay/choosen.png" style="display: inline-block;">
                            </li>
                            <!--
                                <li class="choosen_item" data-id="3">
                                    <img src="images/weixin.gif" title='邮惠付-微信扫码支付'>
                                    <img class="choose_wx" src="images/choosen.png">
                                </li>
                                <li class="choosen_item" data-id="4">
                                    <img src="images/zhifubao.gif"  title='邮惠付-支付宝扫码支付'>
                                    <img class="choose_zfb" src="images/choosen.png">
                                </li>
                            -->
                        </ul>
                    </div>
                 
                </div>

                <div style="margin-top:30px;">
                    <input type="hidden" id="OrderMoney" name="OrderMoney" value="@Request["ordermoney"]" />
                    <a><input type="button" class="button" value="修改金额" onclick="return back()" style="margin-right:20px;" /></a>
                    <a><input type="submit" class="button" value="确认充值" onclick="return submits()" /></a>
                </div>
            </div>

        

	</div>
</form>
	<script>
        $(function () {
            var money = parseFloat($(".ordermoney").html()).toFixed(2);
            $(".ordermoney").html(money);
        });
        function back() {
            location.href = "@Url.Action("payindex")";
        }
		function submits() {
			if (!check())
			    return false;

		    //显示弹框，防止重复点击
			$.jBox.confirm("已经充值成功？", "提示！", function (v, h, f) {
			    if (v == "ok") {
			        location.href = '@Url.Action("index")';
			    }
			});
			return true;
		}

        function check() {
            if ($("#OrderMoney").val() == "") {
                $.jBox.tip('请填写充值金额！');
                return false;
            }
            if (isNaN($("#OrderMoney").val())) {
                $.jBox.tip('金额必须是数字！');
                return false;
            }
            if (parseFloat($("#OrderMoney").val()) < 1) {
                $.jBox.tip('金额不能小于1元！');
                return false;
            }
            return true;
        }
	</script>
}